﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;


class CompareTwoFIles
{
    static void Main(string[] args)
    {
        List<string> file1Rows = new List<string>();
        List<string> file2Rows = new List<string>();
        using (StreamReader file1 = new StreamReader(@"..\..\1.txt"))
        {
            string firstLine = string.Empty;
            while (firstLine != null)
            {
                firstLine = file1.ReadLine();
                file1Rows.Add(firstLine);
            }
        }
        using (StreamReader file2 = new StreamReader(@"..\..\2.txt"))
        {

            string firstLine = file2.ReadLine();
            while (firstLine != null)
            {
                firstLine = file2.ReadLine();
                file2Rows.Add(firstLine);
            }
        }

        int fileLendth = (file1Rows.Count > file2Rows.Count) ? file1Rows.Count : file2Rows.Count;
        for (int counter = 0; counter < fileLendth - 1; counter++)
        {
            if (file1Rows[counter] == file2Rows[counter])
            {
                Console.WriteLine("same: f1[{0}] | f2[{1}]", file1Rows[counter], file2Rows[counter]);
            }
            else
            {
                Console.WriteLine("different: f1[{0}] | f2[{1}]", file1Rows[counter], file2Rows[counter]);
            }
        }
    }
}

